clear all 
cap log close
set more off
set matsize 1000
cd "$path"


*Oregon Study
use "$results/Data/ohie_ed_w_all.dta", clear
gen weights1 = weights_all1*100

graph bar weights1, over(months, label(labsize(small)))  intensity(inten70) bar(1,lcolor(black) color(black)) ///
		b1title("Medicaid Month", height(3) size(small)) ///
		ytitle("Share of Induced Medicaid Months (%)", size(small) height(4)) ///
		graphregion(fcolor(white) color(white) lcolor(white)) 

graph export "$results/Figures/Oregon Health Weights - All.png", replace as(png) width(1000)

use "$results/Data/ohie_ed_w_zero.dta", clear
gen weights1 = weights_zero1*100

graph bar weights1, over(months, label(labsize(small)))  intensity(inten70) bar(1,lcolor(black) color(black)) ///
		b1title("Medicaid Month", height(3) size(small)) ///
		ytitle("Share of Induced Medicaid Months (%)", size(small) height(4)) ///
		graphregion(fcolor(white) color(white) lcolor(white)) 

graph export "$results/Figures/Oregon Health Weights - Zero.png", replace as(png) width(1000)

use "$results/Data/ohie_ed_w_nonzero.dta", clear
gen weights1 = weights_non_zero1*100

graph bar weights1, over(months, label(labsize(small)))  intensity(inten70) bar(1,lcolor(black) color(black)) ///
		b1title("Medicaid Month", height(3) size(small)) ///
		ytitle("Share of Induced Medicaid Months (%)", size(small) height(4)) ///
		graphregion(fcolor(white) color(white) lcolor(white)) 

graph export "$results/Figures/Oregon Health Weights - Nonzero.png", replace as(png) width(1000)

*MSG Study
use "$results/Data/msg_w.dta", clear	
replace weights1 = weights1*100
	
graph bar weights1 , over(week, label(labsize(small)))  intensity(inten70) bar(1,lcolor(black) color(black)) ///
		b1title("Attendance Week", height(3) size(small)) ///
		ytitle("Share of Induced Attendance Weeks (%)", size(small) height(4)) ///
		graphregion(fcolor(white) color(white) lcolor(white))
graph export "$results/Figures/MSG Weights.png", replace as(png) width(1000)

